<!--
 * @Author: DaTree
 * @Date: 2021-09-03 22:10:48
 * @LastEditTime: 2021-09-07 15:32:02
 * @LastEditors: DaTree
 * @Description: DaTreeEdit
 * @FilePath: \demo_services\static\index.html
 * 天将降大任于是人也，必先苦其心志，劳其筋骨，饿其体肤，空乏其身，行拂乱其所为。 ——《孟子•告子下》
 * Copyright 2021 DaTree
-->
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    video {
      width: 320px;
      height: 240px;
      border: 1px solid black;
    }

    div {
      display: inline-block;
    }
  </style>
</head>

<body>
  <script></script>
  <script src="./extra/adapter.js"></script>
  <script src="./lib/clientXHRSignalingChannel.js"></script>
  <script src="./index.js"></script>

  <div id="setup">
    <p>Web RTC Book Demo (local media signaling only,and peer connection only)</p>
    <p>
      Key: <input type="text" name="key" id="key" onkeyup="if(event.keyCode==13){connect();return false;}">
      <button id="connect" onclick="connect()">连接</button>
      <span id="statusline" style="display:none;">
        Status: <span id="status">Disconnected</span>
      </span>
      <button id="call" style="display: none;" onclick="call()">Call</button>
    </p>
  </div>
  <div id="scMessage" style="float:right;display:none;">
    <p>
      Signaling channer message:
      <input type="text" width="100%" name="message" id="message"
        onkeyup="if(event.keyCode==13){send();return false;}" />
      <button id="send" style="display:none;" onclick="send()">
        发送</button>
    </p>
    <p>Response : <span id="response"></span></p>
  </div>



  <h1 id="log">Hello WebRTC!</h1>
  <div style="width:30%;vertical-align: top;">
    <div>
      <video id="myVideo" autoplay="autoplay" controls="controls" muted></video>
    </div>
    <p>
      <b>Outgoing Messages</b><br>
      <textarea id="outmessages" rows="30" style="width:100%;"></textarea>
    </p>
  </div>
  <div style="width:30%;vertical-align: top;">
    <div>
      <video autoplay="autoplay" controls="controls" id="placeholder"></video>
    </div>
    <p>
      <b>Incoming Messages</b>
      <br>
      <textarea id="inmessages" style="width:100%;" rows="30"></textarea>
    </p>
  </div>


  <!-- <audio id="audio1" controls></audio> -->
</body>

</html>